Fix some new api
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 12 Aug 2008 07:25:08 +0000 (07:25 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 12 Aug 2008 07:25:08 +0000 (07:25 +0000)
svn path=/trunk/; revision=21083

ChangeLog
gtk/gtkstatusicon.c
gtk/gtkstatusicon.h

index 6016cb4a13803f22a23516bb241e64a2887dd964..520cfd9a94432a86dcd9432f98cb0bd2aa573c08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-12  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 546730 – gtk_status_icon_get_gicon() should use a return instead
+       of an ouput parameter
+
+       * gtk/gtkstatusicon.[hc]: Change gtk_status_icon_get_gicon to
+       return the GIcon directly.
+       Complaint by Murray Cumming
+
 2008-08-11  Michael Natterer  <mitch@imendio.com>
 
        Bug 546754 – 2.13.6 update create rendering issue in the evolution
index 6b39398f4f1d709ca5d45a5b85738a4d51fa6e7b..62167424a175188204505f81352ccec82383b475 100644 (file)
@@ -773,12 +773,7 @@ gtk_status_icon_get_property (GObject    *object,
       if (priv->storage_type != GTK_IMAGE_GICON)
         g_value_set_object (value, NULL);
       else
-        {
-          GIcon *icon;
-
-          gtk_status_icon_get_gicon (status_icon, &icon);
-          g_value_set_object (value, icon);
-        }
+        g_value_set_object (value, gtk_status_icon_get_gicon (status_icon));
       break;
     case PROP_STORAGE_TYPE:
       g_value_set_enum (value, gtk_status_icon_get_storage_type (status_icon));
@@ -1724,7 +1719,6 @@ gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon)
 /**
  * gtk_status_icon_get_gicon:
  * @status_icon: a #GtkStatusIcon
- * @icon: a place to store a #GIcon
  *
  * Retrieves the #GIcon being displayed by the #GtkStatusIcon.
  * The storage type of the status icon must be %GTK_IMAGE_EMPTY or
@@ -1734,11 +1728,12 @@ gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon)
  *
  * If this function fails, @icon is left unchanged;
  *
+ * Returns: the displayed icon, or %NULL if the image is empty
+ *
  * Since: 2.14
  **/
-void
-gtk_status_icon_get_gicon (GtkStatusIcon  *status_icon,
-                           GIcon         **icon)
+GIcon *
+gtk_status_icon_get_gicon (GtkStatusIcon *status_icon)
 {
   GtkStatusIconPrivate *priv;
 
@@ -1752,7 +1747,7 @@ gtk_status_icon_get_gicon (GtkStatusIcon  *status_icon,
   if (priv->storage_type == GTK_IMAGE_EMPTY)
     priv->image_data.gicon = NULL;
 
-  *icon = priv->image_data.gicon;
+  return priv->image_data.gicon;
 }
 
 /**
index cacb406cd022b04c162b1033a83ca23fcf34c96c..2048f2b94bc52de323022788e05395dc813a1e73 100755 (executable)
@@ -95,8 +95,7 @@ GtkImageType          gtk_status_icon_get_storage_type   (GtkStatusIcon      *st
 GdkPixbuf            *gtk_status_icon_get_pixbuf         (GtkStatusIcon      *status_icon);
 G_CONST_RETURN gchar *gtk_status_icon_get_stock          (GtkStatusIcon      *status_icon);
 G_CONST_RETURN gchar *gtk_status_icon_get_icon_name      (GtkStatusIcon      *status_icon);
-void                  gtk_status_icon_get_gicon          (GtkStatusIcon      *status_icon,
-                                                          GIcon             **icon);
+GIcon                *gtk_status_icon_get_gicon          (GtkStatusIcon      *status_icon);
 
 gint                  gtk_status_icon_get_size           (GtkStatusIcon      *status_icon);